<!DOCTYPE html>
<html lang="en">
<head>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <!--红包样式-->
    <link rel="stylesheet" href="__HOME_PUBLIC__/hb/css/csshake.min.css">
    <link rel="stylesheet" href="__HOME_PUBLIC__/hb/css/style.css">
    <script src="__HOME_PUBLIC__/hb/js/zepto.min.js"></script>
    <script src="__HOME_PUBLIC__/hb/js/red.js"></script>
    <script src="__JS__/jquery-1.10.2.min.js"></script>
    <!--红包样式-->
    <script>
    $(document).ready(function () {
    var h=$(window).height();
    $('.pic').height(h);
    })
        </script>
    <script>
        wx.config({
            debug: false,
            appId: '{$signPackage["appId"]}',
            timestamp: '{$signPackage["timestamp"]}',
            nonceStr: '{$signPackage["nonceStr"]}',
            signature: '{$signPackage["signature"]}',
            jsApiList: [
                'onMenuShareTimeline',
                'onMenuShareAppMessage',
                'onMenuShareQQ',
                'onMenuShareWeibo',
                'onMenuShareQZone',
            ]
        });
        wx.ready(function () {
            var shareData = {
                title: '分享到朋友圈领红包，名额有限，抢完即止',
                desc: '红包可拆开到微信余额，直接作为现金使用',
                link: '',
                imgUrl: '{$shopcode.image}',
                success: function () {
                    // 用户确认分享后执行的回调函数
                    shareok();
                },
                cancel: function () {

                    // 用户取消分享后执行的回调函数
                    sharefail();
                }
            };
            wx.onMenuShareAppMessage(shareData);
            wx.onMenuShareTimeline(shareData);
            wx.onMenuShareQQ(shareData);
            wx.onMenuShareQZone(shareData);
            wx.onMenuShareWeibo(shareData);
        });

        function shareok() {
            var successurl = "{$successurl}";
            var shop_id = "{$shop_id}";
            var user_id = "{$user_id}";
            var id="{$id}";
            alert("分享成功");
            $.post(successurl,{shop_id:shop_id,user_id:user_id,id:id,cid:1},function (data) {
                if(data.code!=null)
                {
                    alert(data.msg);
                }

            })
        }

        function sharefail() {
            alert("您取消了分享，无法获取红包哦");
            return false;
        }
    </script>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <title></title>
    <style>
        *{
            margin:0 auto;
            padding:0 auto;
        }
        body{
            margin:0 auto;
            padding:0 auto;
        }
        img{
            border:0;
        }
        @media only screen and (min-width: 320px){
            html {
                font-size:10px !important;
            }
        }
        @media only screen and (min-width: 360px){
            html {
                font-size:11.25px !important;
            }
        }
        @media only screen and (min-width: 400px){
            html {
                font-size:12.5px !important;
            }
        }
        @media only screen and (min-width: 480px){
            html {
                font-size:15px !important;
            }
        }
        @media only screen and (min-width: 640px){
            html {
                font-size:20px !important;
            }
        }
        .pic{
            width:100%;
            background:url({$shopcode.image}) no-repeat;
            background-size:100% 100%;
        }
        .info{
            background: #fff;
            padding:1rem 1rem;
            position:relative;
            margin-top:2rem;
        }
        .box{
            position:absolute;
            top:0.2rem;
            left:50%;
            margin-left:-11rem;
        }
        .line{
            float:left;
            width:6rem;
            height:1.2rem;
            border-bottom:1px solid red;
            margin-bottom:-1rem;
        }
        .content{
            line-height:1.6rem;
            clear:both;
            margin-top:4rem;
            font-size:1.2rem;
            line-height:2.4rem;
        }
        .title{
            float:left;
            width:10rem;
            height:2.6rem;
            font-size:1.6rem;
            line-height:2.6rem;
            color:#fff;
            background:#dd302a;
            border-radius:2rem;
            text-align: center;
        }
        p{
            font-size:1.2rem;
            line-height:2.4rem;
        }
        .explain{
            color:#444;
            font-size:1.2rem;
            margin-bottom:1rem;
        }
    </style>
</head>

<body>
<div class="container">
    <div class="pic">
    </div>
    <div class="info">
        <div class="box">
            <span class="line"></span><span class="title">活动说明</span><span class="line"></span>
            <div style="height:10px;"></div>
        </div>
        <p class="content">{$shopcode.content}</p>
        <p class="explain">本次活动产生的纠纷与云讯传媒无关</p>
    </div>
</div>
</body>
</html>